﻿<?php
if (   (  ($_COOKIE['StuID'] >=2006011936) && ($_COOKIE['StuID'] <=2006012030)  )
	||($_COOKIE['StuID'] == 2006310676)
	||($_POST['StuID'] == 2006310676)
	||(  ($_POST['StuID'] >=2006011936) && ($_POST['StuID'] <=2006012030)  )   )
	$in_range = True;
	else $in_range = False;
if (  ($in_range == True)  &&  (($_POST[login] == "进入")||($_GET["req"]==""))  ){
	echo '
<table width="100%" border="0" cellspacing="1" cellpadding="4" align="center"><tr>
<td><b>学号</b></td>
</tr><tr>
<td style="PADDING-LEFT: 10px;">
	';
	if ( $_POST['StuID']=='')   echo $_COOKIE['StuID'];
		else echo $_POST['StuID'];
	echo '
</td></tr>
<tr>
<td><b>填写信息</b></td>
</tr><tr>
<td style="PADDING-LEFT: 10px;">
	<a rel="nofollow" href="http://incoming.blueink.org/tuiyan2009/?grade=2006&req=survey" target="_self">填写推研意向问卷</a>
</td></tr>
<tr>
<td><b>信息查询</b></td>
</tr>
<tr><td style="PADDING-LEFT: 10px;">
	<a rel="nofollow" href="http://incoming.blueink.org/blog/2009/%E6%9D%90%E6%96%99%E7%B3%BB%E7%A0%94%E7%A9%B6%E6%96%B9%E5%90%91%E5%8F%8A%E5%AF%BC%E5%B8%88%E6%95%B4%E7%90%86" target="_blank">导师研究方向汇总</a><br>
</td></tr>
<tr><td style="PADDING-LEFT: 10px;">
	<a rel="nofollow" href="http://incoming.blueink.org/tuiyan2009/?grade=2006&req=result" target="_blank">查看问卷统计结果</a><br>
</td></tr>
<tr>
<td><b>登录管理</b></td>
</tr>
<tr><td style="PADDING-LEFT: 10px;">
	<a rel="nofollow" href="http://incoming.blueink.org/tuiyan2009/?grade=2006&req=logout" target="_self">退出登录</a>
</td></tr>
</table>
';}

if (($in_range == True)&&$_GET["req"] == "survey")
		echo '
<h2>说明：</h2>
<p style="width: 650px">如需更改意向信息，请再次填写问卷，我们将根据提交问卷的时间尽快清除旧的统计条目。但在提交问卷后出现的<a rel="nofollow">以图表显示的统计结果</a>中，已经提交的统计项将不会得到删除，故与<a rel="nofollow" href="http://spreadsheets.google.com/ccc?key=0AqPxfsSAkYEidDlRTWdXUTRjTnBNZ2owaWppRm1rRVE&hl=en" target="_blank">表格统计结果</a>显示可能有一定出入。<br>
浏览器提示不能查看到问卷请<a rel="nofollow" href="http://spreadsheets.google.com/viewform?formkey=dDlRTWdXUTRjTnBNZ2owaWppRm1rRVE6MA.." target="_blank">点击此处</a>。</p>
<p align="right" style="font-size: small;"><a rel="nofollow" href="http://incoming.blueink.org/tuiyan2009/?grade=2006" target="_self">返回</a></p>
<iframe src="https://spreadsheets.google.com/embeddedform?key=0AqPxfsSAkYEidDlRTWdXUTRjTnBNZ2owaWppRm1rRVE" width="760" height="2000" frameborder="0" marginheight="0" marginwidth="0">Loading...</iframe>
<p align="right" style="font-size: small;"><a rel="nofollow" href="http://incoming.blueink.org/tuiyan2009/?grade=2006" target="_self">返回</a></p>
';
	else if (($in_range == True)&&$_GET["req"] == "result")
		echo '
<h2>说明：</h2>
<p style="width: 800px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;如果需要更改意向信息，请再次填写问卷，我们将根据提交问卷的时间尽快清除这里旧的统计条目。但在<a rel="nofollow">以图表显示的统计结果</a>中，已经提交的结果将不会被删除，故与此表格显示可能有一定出入，应以此表格为准。<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;浏览器提示不能查看到统计结果请<a rel="nofollow" href="http://spreadsheets.google.com/ccc?key=0AqPxfsSAkYEidDlRTWdXUTRjTnBNZ2owaWppRm1rRVE&hl=en" target="_blank">点击此处</a>。</p>
<iframe scrolling=auto src="http://spreadsheets.google.com/pub?key=t9QMgWQ4cNpMgj0ijiFmkEQ&single=true&gid=0&output=html" frameborder=0 allowtransparency=true style="width:100%;height:100%">Loading...</iframe>';
if (  ($in_range == False)  ||  (($_GET["req"]=="logout")&&($in_range == True))  ){
		if ($_POST['StuID']!='') echo '<span style="color:red; font-size:small">学号错！非材料系访客请到<a rel="nofollow" href="http://www.mse.tsinghua.edu.cn/mse/index.php" target="_blank">此处</a>查询相关信息。</span>';
		echo '<h2 align=left>身份验证</h2>请填入您的学号：<br><br>
		<form name=regform id=regform method=post action=http://incoming.blueink.org/tuiyan2009/?grade=2006>
		    <input type=text value="2006" name=StuID style="width: 75px;">
		    <input type=Submit value="进入" name="login">
		</form>';}
?>